#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 5e5 + 5;

int n, m;
int a[N];
ll sum;
double ans;
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int t;
  cin >> t;
  int r = 0;
  while (t--) {
    int op, x;
    cin >> op;
    if (op == 1) {
      cin >> x;
      a[++n] = x;
      while (r + 1 < n && sum + a[n] > 1ll * (r + 1) * a[r + 1]) sum += a[++r];
    } else {
      double ans = a[n] - (sum + a[n]) * 1.0 / (r + 1);
      cout << fixed << setprecision(10) << ans << endl;
    }
  }
  return 0;
}